package com.etc.entity;

import java.io.Serializable;

public class Comments implements Serializable {
    private Integer cid;

    private Integer carticleid;

    private String ccontent;

    private Integer replycid;

    private User user;

    private String ccreatetime;

    private Integer rootNum;

    private static final long serialVersionUID = 1L;

    public Integer getCid() {
        return cid;
    }

    public void setCid(Integer cid) {
        this.cid = cid;
    }

    public Integer getCarticleid() {
        return carticleid;
    }

    public void setCarticleid(Integer carticleid) {
        this.carticleid = carticleid;
    }

    public String getCcontent() {
        return ccontent;
    }

    public void setCcontent(String ccontent) {
        this.ccontent = ccontent == null ? null : ccontent.trim();
    }

    public Integer getReplycid() {
        return replycid;
    }

    public void setReplycid(Integer replycid) {
        this.replycid = replycid;
    }


    public String getCcreatetime() {
        return ccreatetime;
    }

    public void setCcreatetime(String ccreatetime) {
        this.ccreatetime = ccreatetime == null ? null : ccreatetime.trim();
    }

    public Integer getRootNum() {
        return rootNum;
    }

    public void setRootNum(Integer rootNum) {
        this.rootNum = rootNum;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Comments other = (Comments) that;
        return (this.getCid() == null ? other.getCid() == null : this.getCid().equals(other.getCid()))
            && (this.getCarticleid() == null ? other.getCarticleid() == null : this.getCarticleid().equals(other.getCarticleid()))
            && (this.getCcontent() == null ? other.getCcontent() == null : this.getCcontent().equals(other.getCcontent()))
            && (this.getReplycid() == null ? other.getReplycid() == null : this.getReplycid().equals(other.getReplycid()))
            && (this.getCcreatetime() == null ? other.getCcreatetime() == null : this.getCcreatetime().equals(other.getCcreatetime()))
            && (this.getRootNum() == null ? other.getRootNum() == null : this.getRootNum().equals(other.getRootNum()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getCid() == null) ? 0 : getCid().hashCode());
        result = prime * result + ((getCarticleid() == null) ? 0 : getCarticleid().hashCode());
        result = prime * result + ((getCcontent() == null) ? 0 : getCcontent().hashCode());
        result = prime * result + ((getReplycid() == null) ? 0 : getReplycid().hashCode());
        result = prime * result + ((getCcreatetime() == null) ? 0 : getCcreatetime().hashCode());
        result = prime * result + ((getRootNum() == null) ? 0 : getRootNum().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", cid=").append(cid);
        sb.append(", carticleid=").append(carticleid);
        sb.append(", ccontent=").append(ccontent);
        sb.append(", replycid=").append(replycid);
        sb.append(", ccreatetime=").append(ccreatetime);
        sb.append(", rootNum=").append(rootNum);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}
}